<?
//echo phpinfo();
//echo gd_version();
require 'nebulae/includes/startup.php';
require 'nebulae/includes/image_handler.php';
require 'nebulae/includes/filesystem.php';
$registry->set ('site_path', site_path);
$registry->set ('home_path', '/suser'); //just for marcio
$registry->set ('image_path', 'public/images/'); // image path for marcio

# Load template object
$template = new Template($registry);
$registry->set ('template', $template);

# Load router
$router = new Router($registry);
$registry->set ('router', $router);

#Load Categorias Object
$cadeiras = new Cadeiras($registry, 'cadeiras');
$registry->set ('cadeiras', $cadeiras);

#Load Classificados Object
$classificados = new Classificados($registry, 'classificados');
$registry->set ('classificados', $classificados);

#Load Utilizadores Object
$users = new Users($registry, 'utilizadores');
$registry->set ('users', $users);

$router->setPath (site_path . 'controllers');
session_start();
$router->delegate();
$registry['db']->kill_db();
?>
